<template>
  <div class="content-container" style="position: relative">
     <div style="height: 10px"></div>
      <div class="panel">
        <div class="title">{{data.xwbt00}}</div>
        <div class="time">发布时间：{{data.xwsjsj}}</div>
        <div class="content" v-html="data.xwnr00"></div>
      </div>
  </div>
</template>
<script>
import ReturnBtn from "@/views/components/ReturnBtn.vue";
import {policyApi} from "@/api";
export default {
  name:"news-detail-2",
  components:{
    ReturnBtn
  },
  data(){
    return {
      data:{
        xwxh00:"",
        xwbt00:"",
        xwsjsj:"",
        xwnr00:""
      }
    }
  },
  mounted() {
    this.data.xwxh00=this.$route.query.xwxh00
    this.queryNewsInfo()

  },
  methods:{

    queryNewsInfo(){
      policyApi.queryNewsInfo({xwxh00: this.data.xwxh00}).then((res) => {
        this.data.xwbt00 = res.data.xwbt00
        this.data.xwnr00 = res.data.xwnr00
        this.data.xwsjsj = res.data.xwsjsj

      }).catch(()=>{

      })
    }
  }
}
</script>

<style lang="scss" scoped>
.panel{
    box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 1);
    width: 60%;
    margin: 0px auto 0px auto;
    background-color: white;
    padding: 0px 20px 10px 20px;
  min-height: calc(100vh - 60px);

  .title{
    font-size: 30px;
    font-weight: bolder;
  }
  .time{
    text-align: left;
    padding-left: 50px;
    margin-top: 10px;
  }
  .content{
    border-top: 1px dashed #2c3e50;
    padding-top: 20px;
    margin-top: 20px;
    text-align: left;
    overflow-y: auto;
  }
}

</style>
